//
//  main.m
//  OC3_继承与初始化方法作业第二题
//
//  Created by 徐国庆 on 14-11-4.
//  Copyright (c) 2014年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Person.h"
#import "Family.h"
#import "Man.h"
#import "Woman.h"
#import "Child.h"







int main(int argc, const char * argv[])
{

    //////////////////////////////////////////////////////////////
    //        OC3_继承与初始化方法    作业    第二题
    // 定义类:Family,Man,Woman,Child Family⾥里包含实例变量hunband,wife,son,⽅方法party,travel。 Man⾥里包含wife,age,sex,name,son,⽅方法makeMoney Woman⾥里包含hunband,age,sex,name,son,⽅方法doHousework,cook Child⾥里包含age,sex,name,father,mother,⽅方法play,study 提⽰示:是否可以定义⼀一个⽗父类Person?
    
    Family *family = [[Family alloc] initWithHunband:@"A" wife:@"B" son:@"C"];
    [family party];
    [family travel];
    Man *man = [[Man alloc] initWithWife:@"lele" son:@"dou" name:@"xuguoqing" sex:@"man" age:23];
    [man makemoney];
    Woman *woman = [[Woman alloc] initWithHunband:@"xuguoqng" son:@"dou" name:@"lele" sex:@"nv" age:20];
    [woman cook];
    [woman doHomework];
    Child *child = [[Child alloc] initWithFather:@"xu" mother:@"lele" name:@"dou" sex:@"man" age:10];
    [child play];
    [child study];
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    return 0;
}

